package service;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.CheckDao;
import pojo.Check;

@Service("checkService")
@Mapper
public class CheckService {
	@Autowired
	private CheckDao checkDao;
	
	public int addCheck(int checkid,int courseid,String checktime) {
		return checkDao.addCheck(checkid, courseid, checktime);
	}
	
	public int nextPrimaryKey() {
		return checkDao.nextPrimaryKey();
	}
	
	public Check selectCheckById(int checkid) {
		return checkDao.selectCheckById(checkid);
	}
	
	public List<Check> selectCheckByCourseid(int courseid){
		return checkDao.selectCheckByCourseid(courseid);
	}
}
